import Http from "../index"

export const finddepList = (data:any) => Http.post("/department/findList", data); // 列表
export const findpeopList = (data:any) => Http.post("/admin/findList", data); // 列表
export const findroleList = (data:any) => Http.post("/role/findList", data); // 列表

export const createDep = (data:any) => Http.post("/department/addDep", data); // 增加
export const createAdmin = (data:any) => Http.post("/admin/addAdmin", data); // 增加
export const createRole = (data:any) => Http.post("/role/addRole", data); // 增加
export const createRoleurl = (data:any) => Http.post("/resource/addResource", data); // 增加



export const updateDep = (data:any) => Http.post("/department/saveDep", data); // 修改
export const saveadminStatus = (data:any) => Http.post("/admin/saveStatus", data); // 修改
export const updateAdmin = (data:any) => Http.post("/admin/saveAdmin", data); // 修改
export const updateRole = (data:any) => Http.post("/role/saveRole", data); // 修改


export const deleteRole = (data:any) => Http.post2("/role/delRole", data); // 删除
export const deleteDep = (data:any) => Http.post2("/department/delDep", data); // 删除

export const onlyAdmin = (id:any) => Http.get(`/admin/getAdmin/${id}`); // 信息


export const depNodeFn = () => Http.get("/department/find/depNode"); // 选择框
export const adminListFn = () => Http.post("/admin/selectAllAdmin"); // 选择框
export const resourceNode = () => Http.get("/resource/find/resourceNode"); // 权限
